package com.kuang.springboot05mybaits.controller;

import com.kuang.springboot05mybaits.Service.UserService;
import com.kuang.springboot05mybaits.mapper.UserMapper;
import com.kuang.springboot05mybaits.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService service;

    @RequestMapping("/userList")
    public List<User> quertUserList(){
        List<User> users = service.queryUserList();
        return users;
    }
}
